<template>
  <span :class="colors">{{index +1}}: {{result}}</span>
</template>

<script>
export default {
    props: ["result","index"],
      data () {
          return {
              arr:[]
          }
      },
      computed: {
          colors(){
              if(this.result == "正确") {
                  return "right"
              }else if(this.result == "错误"){
                  return "error"
              }else{
                  return "undo"
              }
          }
      }
};
</script>

<style scoped>
.right {
  color: green;
}
.error {
  color: red;
}
.undo {
  color: #ccc;
}
</style>